home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK1.toast / Development Kits (Disc 1) / QuickDraw GX / Programming Stuff / Sample Code / Printing Samples / Printer Drivers… / CustomWriterGX / CommonDefines.h < prev    next >
Encoding:
Text File  |  1996-03-20  |  2.2 KB  |  73 lines  |  [TEXT/MPS ]

  1. /*
  2.     FILENAME
  3.         CommonDefines.h
  4.  
  5.     DESCRIPTION
  6.         Contains defines used by the various .r and .h files.
  7.  
  8.     COPYRIGHT
  9.         Copyright © 1995 Apple Computer, Inc.
  10.         All rights reserved.
  11.     
  12.     Modification history
  13.         10/04/95 - David Hayward -    Version 1.0.4 modified code so that
  14.                                     the driver can be build under MPW,
  15.                                     Metrowerks, and Symantec.
  16.                                     Also made a few changes so that the
  17.                                     driver can be rebuilt to support any
  18.                                     resolution by changing the #defines
  19.                                     kResolution and kPatStretch in
  20.                                     "CommonDefines.h"
  21.  
  22.         06/14/95 - Dave Hersey -    Version 1.0.3 to fix a bug in
  23.                                     CustomBufferingAndIO.c when creating
  24.                                     high-res PICTs, and to make the size
  25.                                     of buffers more flexible.
  26.  
  27.         05/26/95 - Dave Hersey -    Version 1.0.2 to add the new 'outp'
  28.                                     desktop printer resource in NewApp.c.
  29.  
  30.         05/03/95 - Dave Hersey -    Version 1.0.1 to fix some minor bugs in
  31.                                     CustomBufferingAndIO.c.
  32.  
  33.         01/14/95 - Dave Hersey -    Created from the shell of a hollowed-out
  34.                                     ImageWriter driver.
  35. */
  36.  
  37.  
  38. // Driver info
  39. #define DriverName                "CustomWriter GX"
  40. #define DriverCreator             'cuWR'
  41. #define DriverType                 'pdvr'
  42.  
  43. // PICT file resolution
  44. #define kResolution             72
  45. #define kPatStretch             1    // should be resolution/72
  46.  
  47. // Code segment info-- all driver overrides go in 'pdvr' resources;
  48. // these are the IDs we use for ours.
  49. #define NewSegID                0
  50. #define OldSegID                1
  51.  
  52. // The creator and type of the files we create.  (SimpleText PICTs)
  53. #define kFileCreator            'ttxt'
  54. #define kFileType                'PICT'
  55.  
  56. // Status defines
  57. #define kTransmissionStatID        gxPrintingDriverBaseID    // stat resource ID
  58. #define kSendingPartStatIdx        1    // item number for sending data
  59. #define kPreparingPartStatIdx    2    // item number for preparing data
  60. #define kPrintingPageStatIdx    3    // item number for writing page
  61.  
  62. // The number of our custom buffers, and percentage of free RAM they should use.
  63. #define kNumBuffs                (4)
  64. #define kBuffRAMPercentage        (30)
  65.  
  66. // The maximum amount of RAM we should gobble up for buffers.
  67. #define kMaxRAMToUse            (2000 * 1024)
  68.  
  69. // Defines used by the old-application compatibility code.
  70. #define kPortrait                (0x04)
  71. #define kPrintRecordVers        (12)
  72. #define kDriverWDev                (0x8800)
  73.